#ifndef COMMON_H
#define COMMON_H

#include <QObject>
#include    "option.h"

class common : public QObject
{
    Q_OBJECT
public:
    explicit common(QObject *parent = nullptr);
    INT16S  Hex2Binary(INT8U * hex,INT16U len, INT8U * buffer);
signals:

public slots:
};
#define  SERIAL_BUF_LEN  20
struct  serial_buf_t
{
    char  data[SERIAL_BUF_LEN];
    INT16U head;
    INT16U tail;
};
Q_DECLARE_METATYPE(serial_buf_t)   //qt中使用结构体需要进行声明。
 extern struct  serial_buf_t serial_recv_buf;//串口接收buf结构。
#endif // COMMON_H
